Table of Contents

Use the following to generate a table of contents... ```{toc} ```

Output:

Bookmarks

You can automatically link back to any piece of text by using the...

Usage examples:

In certain cases, multiple bookmarks may match a certain piece of text. To resolve this, the bookmark with the longest match is the one that gets linked to. For example, if the bookmarks Samsung Galaxy and Samsung Galaxy Smartphone matched on the text Samsung Galaxy Smartphone Holder, the second bookmark would get chosen because it matched a longer piece of text.

If the length of the matches are equal, an error is thrown and you'll need to find a way to disambiguate. 2 options are available:

  1. You can explicitly prevent a piece of text from being matched to any bookmark by wrapping it in a bm-r inline tag (`{bm-ri} TEXT`). For example, coke zero should link to the example above but coke zero won't.
  2. You can use the bm-e inline tag (`{bm-e} ERROR_TEXT/REGEX/REGEX_FLAGS`) to generate an error telling the user that they need to disambiguate. For example, you may want to create a bookmark for the word base, but in 2 different contexts: base as in pH scale and base as in nitrogenous base. You can use the bm-e tag to catch any instances of base and throw an error notify the user that they need to provide a more specialized version (e.g. `{bm-e} Base is too ambigiuous. Use either base_pH or base_nucleotide/\b(base)\b/i`), which you can target using bm-a tags (e.g. `{bm-a} base/\b(base)_nucleotide?\b/i` -- this will match base_nucleotide but only output base).

Notes

Generate notes by using the note block tag:

```{note}
This is a custom note.
```

Output:

NOTE: This is a custom note.

TODO: Add CSS styling for this.

Page Title

Set the title of the output document using the title inline/block tag:

```{title}
Markdown Example!
```

Output: (see the title of this HTML page)

If you're using a block tag, make sure you put the title on a NEW line (not on the same line that declares the tag).

MathJax

Add a MathJax TeX expression using mj inline/block tag:

```{mj}
\frac{a}{b}
```

Inline output: $\frac{a}{b}$

Block output:

$$\frac{a}{b} $$

KaTeX

Add a KaTeX TeX expression using kt inline/block tag:

```{kt}
\frac{a}{b}
```

Inline output: ab\frac{a}{b}

Block output:

ab\frac{a}{b}

GraphViz Diagrams

Generate Graphviz dot diagrams by using dot block tag:

```{dot}
digraph {
  a -> b;
  b -> c;
  b -> d;
}
```

Output:

Graphviz Dot Diagram

PlantUML Diagrams

Add a PlantUML diagram using the plantuml block tag:

```{plantuml}
@startuml
class Student {
  Name
}
Student "0..*" - "1..*" Course
(Student, Course) .. Enrollment

class Enrollment {
  drop()
  cancel()
}
@enduml
```

Block output:

PlantUML Diagram

CSV

Add a table using the CSV block tag:

```{csv}
!!{ "firstLineHeader": true }
Code,Country
AFG,Afghanistan
ALB,Albania
ALG,Algeria
ASA,American Samoa
AND,Andorra
ANG,Angola
AIA,Anguilla
ATG,Antigua and Barbuda
```

Block output:

CodeCountry
AFGAfghanistan
ALBAlbania
ALGAlgeria
ASAAmerican Samoa
ANDAndorra
ANGAngola
AIAAnguilla
ATGAntigua and Barbuda

GnuPlot Plots

Add a Gnuplot plot using the gnuplot block tag:

```{gnuplot}
set terminal svg size 300,300

a = 0.9
f(x) = a * sin(x)
g(x) = a * cos(x)
# Plot
plot f(x) title 'sin(x)' with lines linestyle 1, \
     g(x) notitle with lines linestyle 2
```
NOTE: The terminal must be set to svg. No other terminals are supported.

Block output:

Gnuplot plot

Standard Markdown

Normal CommonMark features are supported out of the box.

Block Code:

public static void main(String[] args) {
    ...;
}

Inline Code: code

Bold: bold text

Italic: italicized text

Blockquote:

blockquote blockquote blockquote

Ordered List:

  1. First item
  2. Second item
  3. Third item

Unordered List:

Horizontal Rule:


Link: Link to Google

Image: Image Alt Text

heading2

heading3

heading4

heading5

heading 6

heading 7